package com.si.ui;

import java.awt.Component;
import java.util.Map;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

import com.si.ui.enumn.EConfigMenu;

public class ConfigMenu extends JMenu implements IWidget {

	private static final long serialVersionUID = 3641250302834432128L;

	@Override
	public void initialize(final Map<String, Component> components) {
		this.setText("Configuration");
		final JMenuItem itemRandom = new JMenuItem("Randomness");
		itemRandom.setActionCommand(EConfigMenu.Randomness.toString());
		components.put(EConfigMenu.Randomness.toString(), itemRandom);
		this.add(itemRandom);
		final JMenuItem itemResult = new JMenuItem("Search Count per Word");
		itemResult.setActionCommand(EConfigMenu.ResultPerWord.toString());
		components.put(EConfigMenu.ResultPerWord.toString(), itemResult);
		this.add(itemResult);
	}
}
